<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    div > div {
      width: 200px;
      height: 100px;
    }
    .active {
      background-color: green;
    }
    .text-danger {
      color: orange;
    }
  </style>
</head>
<body>

<div id="app">
  <div class="static" v-bind:class="[activeClass, {'text-danger': hasError}]">class数组语法</div>
</div>

<script src="../lib/vue.js"></script>
<script>
  let vm = new Vue({
    el: '#app',
    data: {
      activeClass: 'active',
      hasError: true
    }
  })
</script>

</body>
</html>